// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.SellOrder;
import com.fowo.api.model.sell.order.SellOrderItemVo;
import com.fowo.api.model.sell.order.SellOrderSearchParamPo;
import com.fowo.api.model.sell.order.SellOrderVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SellOrderMapper extends BaseMapper<SellOrder> {
  Page<SellOrderItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") SellOrderSearchParamPo search
  );
  List<OptionItem<SellOrderItemVo>> searchOptions(
    @Param("search") SellOrderSearchParamPo search
  );
  List<SellOrderItemVo> search(@Param("search") SellOrderSearchParamPo search);
  Date searchLastUpdateTime(@Param("search") SellOrderSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") SellOrderSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") SellOrderSearchParamPo search);
  Long getIdByAmazonOrderId(@Param("amazonOrderId") String amazonOrderId);

  List<Long> getIdsByAmazonOrderId(@Param("list") List<String> list);

  String getAmazonOrderIdById(@Param("id") Long id);

  List<Map<String, Object>> getAmazonOrderIdByIds(@Param("ids") List<Long> ids);
  SellOrderVo selectVoById(@Param("id") Long id);
  /**
   * 销售订单
   */
  List<SellOrderItemVo> sellOrder(
    @Param("search") SellOrderSearchParamPo search
  );

  /**
   * 获取销售订单编号列表
   */
  List<Long> sellOrderIds(@Param("search") SellOrderSearchParamPo search);

  /**
   * 获取销售订单的总数
   */
  Long sellOrderCount(@Param("search") SellOrderSearchParamPo search);

  /**
   * 销售订单分页
   */
  Page<SellOrderItemVo> sellOrderPage(
    @Param("page") Page page,
    @Param("search") SellOrderSearchParamPo search
  );
  Date sellOrderLastUpdateTime(@Param("search") SellOrderSearchParamPo search);
  /**
   * 多渠道订单
   */
  List<SellOrderItemVo> multiChannel(
    @Param("search") SellOrderSearchParamPo search
  );

  /**
   * 获取多渠道订单编号列表
   */
  List<Long> multiChannelIds(@Param("search") SellOrderSearchParamPo search);

  /**
   * 获取多渠道订单的总数
   */
  Long multiChannelCount(@Param("search") SellOrderSearchParamPo search);

  /**
   * 多渠道订单分页
   */
  Page<SellOrderItemVo> multiChannelPage(
    @Param("page") Page page,
    @Param("search") SellOrderSearchParamPo search
  );
  Date multiChannelLastUpdateTime(
    @Param("search") SellOrderSearchParamPo search
  );
}
